﻿@model SCMS.UI.Models.SalaryPayment
@{AjaxOptions ajaxOpts = new AjaxOptions
      {
          UpdateTargetId = "popup-page",
          LoadingElementId = "popup-loading",
          HttpMethod = "Post",
          Url = Url.Action("SaveSalaryPayment"),
          OnBegin = "ShowDialogue('Create SP Item')",
          OnSuccess = "CenterPopup"
      };}
<script src="@Url.Content("~/Scripts/js/jquery-1.7.2.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/js/procument.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<div class="partialViewCard">
    <div class="partialViewCardHeader">
        <h3>
            Salary Payment</h3>
    </div>
    <br />
    @using (Ajax.BeginForm(null, null, ajaxOpts, new { @class = "form" }))
    {
        @Html.ValidationSummary(true)
    
    
        <table width="98%" align="center" cellpadding="0">
            <tr>
                <th align="center">
                    Salary Payment Number
                </th>
                <th align="center">
                    Payment Date
                </th>
                <th align="center">
                    Currency
                </th>
            </tr>
            <tr>
                <td align="center">
                    @Html.TextBoxFor(m => m.EntitySalaryP.RefNumber, new { @readonly = "readonly" })
                </td>
                <td align="center">
                    @Html.EditorFor(m => m.EntitySalaryP.PayrollDate)
                    @Html.ValidationMessageFor(m => m.EntitySalaryP.PayrollDate)
                </td>
                <td align="center">
                    @Html.DropDownListFor(x => x.EntitySalaryP.SalaryCurrencyId, Model.Currencies, "- please select -", new { @id = "currencyId" })
                    @Html.ValidationMessageFor(x => x.EntitySalaryP.SalaryCurrencyId)
                </td>
            </tr>
            <tr>
                <th align="center">
                    Month
                </th>
                <th align="center">
                    Year
                </th>
                <th align="center">
                    Office
                </th>
            </tr>
            <tr>
                <td align="center">
                    @Html.DropDownListFor(x => x.EntitySalaryP.PayrollMonth, Model.Months, "- please select -")
                    @Html.ValidationMessageFor(x => x.EntitySalaryP.PayrollMonth)
                </td>
                <td align="center">
                    @Html.EditorFor(x => x.EntitySalaryP.PayrollYear)
                    @Html.ValidationMessageFor(x => x.EntitySalaryP.PayrollYear)
                </td>
                <td align="center">
                    @Html.DropDownListFor(x => x.EntitySalaryP.SubOfficeId, Model.Offices, "- please select -")
                    @Html.ValidationMessageFor(x => x.EntitySalaryP.SubOfficeId)
                </td>
            </tr>
            <tr>
                <th align="center">
                    Subject/Purpose
                </th>
                <th align="center">
                    Remarks
                </th>
                <th align="center">
                </th>
            </tr>
            <tr>
                <td align="center">
                    @Html.TextAreaFor(m => m.EntitySalaryP.Subject)
                    @Html.ValidationMessageFor(m => m.EntitySalaryP.Subject)
                </td>
                <td align="center">
                    @Html.TextAreaFor(x => x.EntitySalaryP.Remarks)
                    @Html.ValidationMessageFor(x => x.EntitySalaryP.Remarks)
                </td>
                <td align="center">
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    <input type="submit" class="btn green" value="  Save  " />
                </td>
            </tr>
        </table>
    
    }
</div>
